package com.qianchang.microfinance.view.hspayresult;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RelativeLayout;

import com.dm.library.widgets.element.DTextView;
import com.dm.library.widgets.statusbar.StatusBarUtil;
import com.qianchang.microfinance.R;
import com.qianchang.microfinance.view.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by Administrator on 2018/1/14.
 *
 *  支付成功失败结果页面
 *
 */

public class PayResultActivity extends BaseActivity {

    @BindView(R.id.tv_back)
    DTextView tvBack;
    @BindView(R.id.tv_title)
    DTextView tvTitle;
    @BindView(R.id.bt_fail_id)
    Button failBut;
    @BindView(R.id.bt_true_id)
    Button susBut;
    @BindView(R.id.rl_sucs_id)
    RelativeLayout rlSucs;
    @BindView(R.id.rl_fail_id)
    RelativeLayout rlFail;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_payresult_layout);
        StatusBarUtil.setTranslucentForImageViewInFragment(PayResultActivity.this, null);
        ButterKnife.bind(this);

        initView();
    }

    @Override
    protected void initView() {
        super.initView();
        tvTitle.setText(getString(R.string.Label_register));
        Drawable drawable = getResources().getDrawable(R.drawable.exit);
        drawable.setBounds(0, 0, drawable.getMinimumWidth(), drawable.getMinimumHeight());
        tvBack.setCompoundDrawables(drawable, null, null, null);

    }


    @OnClick({R.id.bt_true_id, R.id.bt_fail_id})
    public void onViewClicked(View view) {
        int vId = view.getId();
        switch (vId){
            case R.id.bt_true_id:
                rlSucs.setVisibility(View.GONE);
                rlFail.setVisibility(View.VISIBLE);
                break;
            case R.id.bt_fail_id:

                break;
        }
    }

}
